<%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib uri="/page" prefix="public"%>
<public:pageControl classPath="app.web.cartoon.collect.CartoonDetailEdit"/>
<script type="text/javascript">

function cartoonDetailGrid_window_afterOnload(windows,page){
	
	var state = page.element.parameter.state;
	
	if(state == "insert" || state == "past"){
		
		var canID = windows.dataSet.getDataSetValue("CAN_ID");
		
		var sendSet = new Yacon.data.DataSet(page);
		sendSet.setWhereField("canID",canID);
		sendSet.switchMessage("loadData");
		
		var form = page.find("cartoonMainForm");
		
		if(sendSet.next()){	
			form.value("CAN_NAME",sendSet.getDataSetValue("CAN_NAME"));
			form.value("CAN_NAM_ENG",sendSet.getDataSetValue("CAN_NAM_ENG"));
			form.value("CAN_NAM_JAP",sendSet.getDataSetValue("CAN_NAM_JAP"));
			form.value("CAN_FIRST",sendSet.getDataSetValue("CAN_FIRST"));
			form.value("CAN_AREA",sendSet.getDataSetValue("CAN_AREA"));
			form.value("CAN_SOURCE",sendSet.getDataSetValue("CAN_SOURCE"));
		}
		
	}
}

</script>